<% layout('/layouts/default.html', {title: '合同表管理', libs: ['validate']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${ftyLeaseContractSmart.isNewRecord ? '新增合同表' : '编辑合同表'}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<#form:form id="inputForm" model="${ftyLeaseContractSmart}" action="${ctx}/fty/ftyLeaseContractSmart/save" method="post" class="form-horizontal">
			<div class="box-body">
				<div class="form-unit">基本信息</div>
				<#form:hidden path="contractCode"/>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 出租方：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="aName" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 受租方：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="bName" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="form-unit">房屋信息</div>
				<div class="row">
					<!--<div class="col-xs-12">-->
						<!--<div class="form-group">-->
							<!--<label class="control-label col-sm-4" title="">-->
								<!--<span class="required hide">*</span> 中介方：<i class="fa icon-question hide"></i></label>-->
							<!--<div class="col-sm-8">-->
								<!--<#form:input path="cName" maxlength="32" class="form-control"/>-->
							<!--</div>-->
						<!--</div>-->
					<!--</div>-->
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 房屋地址：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hAddess" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 建筑面积：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hArea" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 室内设施：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hDecoration" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 附属用房：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="subRoom" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 房屋结构：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="hStruts" dictType="contract_struts_type" blankOption="true" class="form-control"/>

							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 房屋设计合理使用年限：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">

								<#form:input path="hYear" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>

				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 房屋竣工时间：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hFinishTime" readonly="true" maxlength="20" class="form-control Wdate"
										dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>

							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 房屋结构改造情况：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="transSituation" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
			<div class="form-unit">费用</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 租凭期限(隔越)：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="leaseTimeLimit" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 出租开始日期：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="leaseStart" readonly="true" maxlength="20" class="form-control Wdate"
										dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 出租结束日期：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="leaseEnd" readonly="true" maxlength="20" class="form-control Wdate"
										dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 每月租金：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="rentPerMonth" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 按 月、季度、年：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">

								<#form:select path="rentSelect" dictType="contract_month_year" blankOption="true" class="form-control"/>

							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 首付：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hMoneyFirst" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 首付款结清时间：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hMoneyFirstTime" readonly="true" maxlength="20" class="form-control Wdate"
										dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 结款提前天数：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="moneyAdvance" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 押金：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="deposit" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 水电煤气以及()费用：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hOthers" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 维修费承担方：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="hExpensPart" dictType="contract_abc" blankOption="true" class="form-control"/>

							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 租凭房屋用途：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hUseage" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 中介费：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hAgencyFee" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide"></span> 500中介费承担方*：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="hAgencyPart" dictType="contract_abc" blankOption="true" class="form-control"/>


							</div>
						</div>
					</div>


					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 中介费付清时间：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="hAgencyTime" readonly="true" maxlength="20" class="form-control Wdate"
										dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>

							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 交房时间：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="makeHouseTime" readonly="true" maxlength="20" class="form-control Wdate"
										dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 违约金：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="penalty" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 解决途径：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">


								<#form:input path="solveWay" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								备注
								</label>
							<div class="col-sm-8">
								1、向__________仲裁委员会申请仲裁；
								2、向__________人民法院提起起诉。
							</div>
						</div>
					</div>
				</div>

				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 解决途径机构所在：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="solvewayPath" maxlength="32" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> 备注：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-10">
								<#form:textarea path="remarks" rows="4" maxlength="64" class="form-control"/>
							</div>
						</div>
					</div>
				</div>

			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('fty:ftyLeaseContractSmart:edit')){ %>
						<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
	$("#inputForm").validate({
		submitHandler: function(form){
			js.ajaxSubmitForm($(form), function(data){
				js.showMessage(data.message);
				if(data.result == Global.TRUE){
					js.closeCurrentTabPage(function(contentWindow){
						contentWindow.page();
					});
				}
			}, "json");
		}
	});
</script>